///*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
//package com.searchbook;
//
//import android.content.Context;
//import android.content.res.Resources;
//import android.os.Handler;
//import android.util.Log;
//import com.searchbook.keywordsfetch.MyRunnable;
//import com.searchbook.keywordsfetch.XmlParser;
//import com.searchbook.keywordsfetch.XmlTag;
//import com.searchbook.keywordsflow.KeywordsFlow;
//import java.io.IOException;
//import java.util.ArrayList;
//import java.util.Vector;
//import org.apache.http.HttpResponse;
//import org.apache.http.StatusLine;
//import org.apache.http.client.ClientProtocolException;
//import org.apache.http.client.methods.HttpGet;
//import org.apache.http.impl.client.DefaultHttpClient;
//import org.apache.http.util.EntityUtils;
//import org.xmlpull.v1.XmlPullParserException;
//
//public class ToolSearch {
//	private static void add2keywordPool(Context paramContext, ArrayList<String> paramArrayList)
//  {
//    int i = paramArrayList.size();
//    int j = 0;
//    
//    while (j < i) {
//    	if ((paramArrayList.get(j) != null) && (!(((String)paramArrayList.get(j)).equals("\n")))) {
//    		KeyWordManagement.addKeyWord(paramContext, (String)paramArrayList.get(j));
//    	}
//    	
//    	j++;
//    }
//  }
//
//	public static void addArrayList2UI(ArrayList<String> paramArrayList,
//			Handler paramHandler, MyRunnable paramMyRunnable) {
//		paramMyRunnable.setifupdateListView(true);
//		paramMyRunnable.setListView(paramArrayList);
//		paramHandler.post(paramMyRunnable);
//	}
//
//	public static void addKeywords2list(KeywordsFlow paramKeywordsFlow,
//			String[] paramArrayOfString) {
//		int i = paramArrayOfString.length;
//		int j;
//		if (i <= 10) {
//			j = i;
//		} else {
//			j = 10;
//		}
//		
//		for (int k = 0; k < j; ++k) {
//			paramKeywordsFlow.addKeyword2list(paramArrayOfString[k]);
//		}
//	}
//
//	public static int getDrawableResIDByName(Context paramContext,
//			String paramString) {
//		return paramContext.getResources().getIdentifier(paramString,
//				"drawable", paramContext.getPackageName());
//	}
//
//	public static int getIdResIDByName(Context paramContext, String paramString) {
//		return paramContext.getResources().getIdentifier(paramString, "id",
//				paramContext.getPackageName());
//	}
//
//	public static int getLayoutResIDByName(Context paramContext,
//			String paramString) {
//		return paramContext.getResources().getIdentifier(paramString, "layout",
//				paramContext.getPackageName());
//	}
//
//	public static void handleSuggestion(String paramString,
//			HttpResponse paramHttpResponse,
//			DefaultHttpClient paramDefaultHttpClient, HttpGet paramHttpGet,
//			Handler paramHandler, MyRunnable paramMyRunnable,
//			boolean paramBoolean) throws ClientProtocolException, IOException,
//			XmlPullParserException {
////		HttpResponse localHttpResponse = paramDefaultHttpClient
////				.execute(paramHttpGet);
////		int i = localHttpResponse.getStatusLine().getStatusCode();
////		String str1 = EntityUtils.toString(localHttpResponse.getEntity());
////		XmlParser localXmlParser;
////		int j;
////		ArrayList localArrayList;
////		if (i == 200) {
////			localXmlParser = new XmlParser(str1);
////			j = localXmlParser.getTags().size();
////			localArrayList = new ArrayList();
////		}
////		for (int k = 0;; ++k) {
////			if (k >= j) {
////				if (localArrayList.size() != 0) {
////					if (paramString != null)
////						break;
////					add2keywordPool(paramMyRunnable.context, localArrayList);
////					if (!(paramBoolean))
////						updateSea(paramHandler, paramMyRunnable);
////				}
////				return;
////			}
////			String str2 = ((XmlTag) localXmlParser.getTags().elementAt(k))
////					.getTagValue();
////			if (str2.contains("http"))
////				continue;
////			localArrayList.add(str2);
////		}
////		addArrayList2UI(localArrayList, paramHandler, paramMyRunnable);
//	}
//
//	public static void updateSea(Handler paramHandler,
//			MyRunnable paramMyRunnable) {
//		paramMyRunnable.setifupdateSea(true);
//		paramHandler.post(paramMyRunnable);
//	}
//}